home *** CD-ROM | disk | FTP | other *** search
- %!PS-Adobe-1.0
- %%Creator: Steve Holden
- %%Modified: John Macdonald, Rich Burridge, Rainer Klute
- %%Modified: Bertrand Decouty, Bjorn P. Brox
- %%Title: @(#)mp.pro.ps 1.7 92/02/17
- %%CreationDate: see above
- %%PageLength 60
- %%LineLength 80
- %%DocumentFonts: Courier Helvetica-BoldOblique Times-Bold Times-Roman
- %%ShowZcodeLogo
- %%ShowXface
- %%Pages: (atend)
- %%EndComments
-
- /setmargin {
- /leftedge 0 def
- /bottomedge 0 def
- fullheight fullwidth LandscapeMode { exch } if
- /rightedge exch def
- /topedge exch def
- 9 7 LandscapeMode { exch } if pop
- /FontSize exch def
-
- /font1d /Times-Bold reencodeISO
- /font2d /Times-Roman reencodeISO
- /CourierISO /Courier reencodeISO
- /fontHd /Helvetica-BoldOblique reencodeISO
- /fontH2 /Helvetica-BoldOblique reencodeISO
- /fontNd /Times-Bold reencodeISO
- /font3d backspacefont
-
- /BoldFont { /font1d findfont FontSize scalefont setfont } def
- /pf { /font2d findfont FontSize scalefont setfont } def
- /sf { /font3d findfont FontSize scalefont setfont } def
- /fontH { /fontHd findfont 14 scalefont setfont } def
- /fontD { /fontH2 findfont 10 scalefont setfont } def
- /fontN { /fontNd findfont 12 scalefont setfont } def
- } def
-
- /graybox % grey x1 y1 x2 y2 graybox --
- {
- newpath
- 4 -1 roll 2 copy % y2 x1
- 10 sub exch moveto
- 4 -1 roll 2 copy % x1 y1
- 10 180 270 arc
- 4 -1 roll 1 copy 3 -1 roll % x2 y1
- 10 270 0 arc
- 3 -1 roll 1 copy 3 1 roll % x1 y2 x2 y2
- 10 0 90 arc
- 10 90 180 arc
- closepath
- gsave
- setgray fill
- grestore
- 0 setgray stroke
- } bind def
-
- /endpage % page_number endpage --
- {
- gsave
- % listing type, user, date across the top
- 0.88 % gray level
- leftedge 50 add topedge 56 sub % bottom lt corner
- rightedge 95 sub topedge 36 sub % top rt corner
- graybox
-
- currentdict /sfactor known not
- {
- % determine a suitable factor to scale down the header text (done
- % only once per document)
- rightedge 95 sub leftedge 50 add sub % available space
- fontD MailFor stringwidth pop
- fontH User stringwidth pop add
- ( ) stringwidth pop add
- fontD TimeNow stringwidth pop add % total length of strings
- div
- dup 1 gt {pop 1} if % does it fit?
- /sfactor exch def % if not scale down
- }
- if
-
- leftedge 50 add topedge 50 sub moveto
- gsave
- sfactor dup scale
- fontD MailFor show
- fontH User show
- ( ) show
- grestore
- fontD
- rightedge 95 sub TimeNow stringwidth pop sfactor mul sub
- topedge 50 sub moveto
- gsave
- sfactor dup scale
- TimeNow show
- grestore
- % page number to the top right corner
- 1 % gray level
- rightedge 70 sub topedge 56 sub % bottom lt
- rightedge 50 sub topedge 36 sub % top rt
- graybox
- fontD
- (Page) dup stringwidth
- topedge 40 sub exch sub % y-centered
- exch 2 div rightedge 60 sub exch sub % x-centered
- exch moveto show
- fontH
- dup stringwidth
- topedge 58 sub exch sub % y-centered
- exch 2 div rightedge 60 sub exch sub % x-centered
- exch moveto show
- 1
- rightedge 70 sub bottomedge 50 add % top rt corner
- rightedge 50 sub bottomedge 70 add % bottom lt corner
- graybox
- gsave
- rightedge 75 sub bottomedge 45 add % top rt corner
- translate
- 30 30 scale
- hasface {
- /picstr 48 string def
- 48 48 8
- [48 0 0 -48 0 48]
- { currentfile picstr readhexstring pop }
- image
- } {
- /picstr 150 string def
- 150 136 8
- [150 0 0 -136 0 136]
- { currentfile picstr readhexstring pop }
- image
- } ifelse
- grestore
-
- 0.88 % gray level
- leftedge 50 add bottomedge 50 add % bottom lt corner
- rightedge 95 sub bottomedge 70 add % top rt corner
- graybox
- fontH
- % compute x pos for centring
- % ((l+50) + (r-50)) / 2 is the page centre
- leftedge rightedge add 2 div
- % but we want to start at the beginning of the string, not the middle
- Subject stringwidth pop 2 div sub
- % y pos is simple
- bottomedge 54 add
- moveto
- Subject show
- grestore
- % PageSave restore % restore *always* before showpage
- showpage % display it
- } bind def
-
- /endcol % page_number col_number endcol --
- {
- pop % get rid of col_number
- pop % get rid of page_number
- /ypos topedge 92 sub def
- /xpos rightedge leftedge sub 2 div def
- xpos ypos moveto
- } bind def
-
- /newpage % page_number newpage --
- {
- pop % pageno
- % /PageSave save def
- LandscapeMode {setlandscape} if
- /lct 0 def
- /ypos topedge 92 sub def
- /xpos leftedge 50 add def
- xpos ypos moveto
- sf
- } bind def
-
- /setlandscape
- {
- 612 0 translate
- 90 rotate
- } bind def
-
- /showline
- {
- show
- /ypos ypos FontSize sub def
- xpos ypos moveto
- } bind def
-
- % see the trouble shooting section in the README for details on setscreen.
- 106 45 {dup mul exch dup mul add 1.0 exch sub} setscreen
-
- /LandscapeMode false def
-
- setmargin
-